package com.iwop.moto.service.impl;

import com.iwop.moto.model.SuperRecordModel;
import com.iwop.moto.service.BaseService;
import com.iwop.moto.service.IFMotoGeneralService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by chenzq on 2016/11/3.
 */
@SuppressWarnings("serial")
@Service("fMotoGeneralService")
public class FMotoGeneralServiceImpl extends BaseService implements IFMotoGeneralService {
    /**
     * 数据表:F_MOTO_GENERAL 部件信息表
     * 功能说明:部件信息 - 统计分页的查询条数
     *
     * @return List<SuperRecordModel>
     */
    public List<SuperRecordModel> searchMotoGeneralList(SuperRecordModel SRModel) {
        List<SuperRecordModel> srmList = getSqlSession().selectList("FMotoGeneraMapper.searchMotoGeneralList", SRModel);
        return srmList;
    }

    /**
     * 数据表:F_MOTO_GENERAL 部件信息表
     * 功能说明:部件信息 - 统计
     *
     * @return SuperRecordModel
     */
    public SuperRecordModel findMotoGeneralTotalPage(SuperRecordModel SRModel) {
        return getSqlSession().selectOne("FMotoGeneraMapper.findMotoGeneralTotalPage", SRModel);
    }

    /**
     * 数据表:F_MOTO_GENERAL 部件信息表
     * 功能说明:部件信息- 新增
     *
     * @return void
     */
    public void insertMotoSelective(SuperRecordModel SRModel) {
        getSqlSession().selectOne("FMotoGeneraMapper.insertSelective", SRModel);
    }

    /**
     * 数据表:F_MOTO_GENERAL 部件信息表
     * 功能说明:部件信息 - 更新
     *
     * @return void
     */
    public void updeteSelective(SuperRecordModel SRModel) {
        getSqlSession().selectOne("FMotoGeneraMapper.updeteSelective", SRModel);
    }

    public SuperRecordModel findFmotoBySid(SuperRecordModel SRModel) {
       return getSqlSession().selectOne("FMotoGeneraMapper.findFmotoBySid",SRModel);
    }

    /**
     * 数据表:F_MOTO_GENERAL 部件信息表
     * 功能说明:部件信息 - 软删除
     *
     * @return void
     */
    @Override
    public void updatePartStatus(SuperRecordModel SRModel) {
        getSqlSession().selectOne("FMotoGeneraMapper.updatePartStatus",SRModel);
    }
}
